package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-09-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order_output_temu_product")
public class OrderOutputTemuProductDo extends Model<OrderOutputTemuProductDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 客户单号
     */
    @TableField("order_no")
    private String orderNo;

    @TableField("parent_no")
    private String parentNo;

    @TableField("order_sn")
    private String orderSn;

    @TableField("cw_sku_code")
    private String cwSkuCode;

    @TableField("product_id")
    private Long productId;

    @TableField("qty")
    private Integer qty;

    /**
     * 待回传订单发运信息数量
     */
    @TableField("to_push_count")
    private Integer toPushCount;

    @TableField("track_number")
    private String trackNumber;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    public OrderOutputTemuProductDo() {
    }

    public OrderOutputTemuProductDo(String orderNo, String parentNo, String orderSn, String cwSkuCode, Long productId, Integer qty) {
        this.orderNo = orderNo;
        this.parentNo = parentNo;
        this.orderSn = orderSn;
        this.cwSkuCode = cwSkuCode;
        this.productId = productId;
        this.qty = qty;
        this.toPushCount = qty;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
